home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / misc / textfield.lha / Textfield / Oberon / TextField.mod < prev   
Text File  |  1994-11-12  |  3KB  |  125 lines

  1. MODULE TextField;
  2.  
  3. (* Oberon Interface for textfield.gadget ©1994 Mark Thomas
  4. ** $VER: TextField.mod 2.0 (12.12.94)
  5. **
  6. ** Stefan
  7. **
  8. ** slbrbbbh@w250zrz.zrz.TU-Berlin.de
  9. **    StElb@IRC
  10. **
  11. ** Updated for V2.0 by Mark Thomas
  12. *)
  13.  
  14. IMPORT Exec, I := Intuition, u := Utility;
  15.  
  16. (*
  17.  * textfield.h
  18.  *
  19.  * Copyright © 1994 Mark Thomas
  20.  *
  21.  * Defines for the BOOPSI textfield.gadget V2.0.
  22.  *)
  23. CONST
  24.  
  25. tagBase = u.user + 04000000H;
  26.  
  27. (*
  28.  * V1
  29.  *)
  30.  
  31. text         * = tagBase + 1;
  32. insertText   * = tagBase + 2;
  33. textFont     * = tagBase + 3;
  34. delimiters   * = tagBase + 4;
  35. top          * = tagBase + 5;
  36. blockCursor  * = tagBase + 6;
  37. size         * = tagBase + 7;
  38. visible      * = tagBase + 8;
  39. lines        * = tagBase + 9;
  40. noGhost      * = tagBase + 10;
  41. maxSize      * = tagBase + 11;
  42. border       * = tagBase + 12;
  43. textAttr     * = tagBase + 13;
  44. fontStyle    * = tagBase + 14;
  45. up           * = tagBase + 15;
  46. down         * = tagBase + 16;
  47. alignment    * = tagBase + 17;
  48. vCenter      * = tagBase + 18;
  49. ruledPaper   * = tagBase + 19;
  50. paperPen     * = tagBase + 20;
  51. inkPen       * = tagBase + 21;
  52. linePen      * = tagBase + 22;
  53. userAlign    * = tagBase + 23;
  54. spacing      * = tagBase + 24;
  55. clipStream   * = tagBase + 25;
  56. clipStream2  * = tagBase + 26;
  57. undoStream   * = tagBase + 26;
  58. blinkRate    * = tagBase + 27;
  59. inverted     * = tagBase + 28;
  60. partial      * = tagBase + 29;
  61. cursorPos    * = tagBase + 30;
  62.  
  63. (*
  64.  * V2
  65.  *)
  66.  
  67. readOnly     * = tagBase + 31;
  68. modified     * = tagBase + 32;
  69. acceptChars  * = tagBase + 33;
  70. rejectChars  * = tagBase + 34;
  71. passCommand  * = tagBase + 35;
  72. lineLength   * = tagBase + 36;
  73. maxSizeBeep  * = tagBase + 37;
  74. deleteText   * = tagBase + 38;
  75. selectSize   * = tagBase + 39;
  76. copy         * = tagBase + 40;
  77. copyAll      * = tagBase + 41;
  78. cut          * = tagBase + 42;
  79. paste        * = tagBase + 43;
  80. erase        * = tagBase + 44;
  81. undo         * = tagBase + 45;
  82.  
  83. (*
  84.  *Border
  85.  *
  86.  * See docs for width and height sizes these borders are
  87.  *)
  88.  
  89. none              * = 0;
  90. bevel             * = 1;
  91. doubleBevel       * = 2;
  92.  
  93. (*
  94.  *Alignment
  95.  *)
  96.  
  97. left             * = 0H;
  98. center           * = 1H;
  99. right            * = 2H;
  100.  
  101. VAR
  102.   base * : Exec.LibraryPtr;
  103.   textFieldClass * : I.IClassPtr;
  104.  
  105. PROCEDURE GetClass      *{base,-30}():I.IClassPtr;
  106.  
  107. BEGIN
  108. (*
  109.  * TextField autoinit and autoterminate functions
  110.  * for Oberon.
  111.  *
  112.  * If you just compile and link this into your app
  113.  * then TextFieldBase will automatically get setup
  114.  * before main() is called.
  115.  *)
  116.  
  117. base := Exec.OpenLibrary("gadgets/textfield.gadget", 0);
  118. textFieldClass := GetClass();
  119.  
  120. CLOSE
  121.  
  122. IF base#NIL THEN Exec.CloseLibrary(base) END;
  123.  
  124. END TextField.
  125.